<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/constrant.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>按天包车</title>
<script src="${ctxStatic }/jquery/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="${ctxStatic }/gov/js/cityselect.js" ></script>
<link rel="stylesheet" href="${ctxStatic }/gov/css/govday.css" />
<link href="${ctxStatic }/cityselector/cityselect.css" rel='stylesheet'type='text/css' />
<script src="${ctxStatic}/jquery/jquery.validate.js" type="text/javascript"></script>
<style type="text/css">
#departcity_sitename-error{
	width: 100%;
	float: left;
    box-sizing: border-box;
    margin-top: 10px;
    padding-left: 120px;
    color: #ff0000;
    text-align:left;
    font-size: 12px;
    line-height: 20px;
}


</style>
<script type="text/javascript">
	$(function() {
		
		if("${message}".length>0){
			alert("${message}");
		}
		
		$.post("${ctxFront }/sms/ipLocation", function(d) {//d==城市名
			$("#departcity_sitename").html(d);
			setCity(d);
		});
		// 菜单选中效果
		$('.' + $('#menuInfo').val()).addClass("dg_nav_cg");
		$('.funcMenu').click(function() {
			var url = $(this).attr('data-url');
			if (url != '#') {
				window.location.href = $(this).attr('data-url');
			}
		});
		$('#travel')
				.click(
						function() {
							window.location.href = '${pageContext.request.contextPath }/indexTravelRent.jsp';
						});
	})
	function setCity(obj) {
		$.post('${ctxFront}/json/getSiteidByName', "name=" + obj,
				function(data) {
					// 定位城市选中
					var $autocity = $('input[data-autocity="yes"]');
					if (data.sitename != null) {
						$autocity.val(data.sitename);
						$autocity.next('input').val(data.siteid);
					} else {
						$autocity.val('常州市');
						$autocity.next('input').val('580');
					}
				});
	}
</script>

<script>
$(document).ready(function() {
	$('#custfo').validate({ 
	rules:{
		 'departcity.sitename':"required"
	    },	    
	   messages:{
		   'departcity.sitename': "<i class='verico'></i>请输入出发城市"
	   }
	
})

$.post('${ctxFront}/info/site/siteJson',{spottypes:'0,b'}, function(data) {
	var allCity = data;//['北京市#001#1|beijing|bj','上海市#002#0|shanghai|sh'];
	new Vcity.CitySelector({input:'departcity_sitename',cityData:allCity});
});
})
	</script>
</head>
<body>
		<%@include file="../index/head.jsp" %>
		 <div id="govday">
		  	  <div class="govday-main">
		  	  	 <div class="govday-banner">
		  	  	 	 <a href="#">
		  	  	 	 	 <img src="${ctxStatic }/gov/img/govday.jpg" />
		  	  	 	 </a>
		  	  	 </div>
		  	  	 <div class="govday-body">
		  	  	 	  <div class="govday-title">
		  	  	 	  	 <h5>按天包车</h5>
		  	  	 	  </div>
		  	  	 	  <div class="govday-query">
		  	  	 	  	  <form  id="custfo" action="${ctxGov }/getDayRentList" method="post">
		  	  	 	  	  	   <div class="gov-d-il">
		  	  	 	  	  	   	  <span>出发城市：</span>
		  	  	 <input type="text" id="departcity_sitename" data-autocity="yes" class="required" name="departcity.sitename" value="" placeholder="请输入出发地" autocomplete="off"/>
				<input type="hidden" name="departcity.siteid" value=""/>
		  	  	 	  	  	   </div>
		  	  	 	  	  	   <div class="gov-d-il">
		  	  	 	  	  	   	  <span>出发时间：</span>
	
 <input type="text" placeholder="选择日期" class="custom-day Wdate" name="fromdateStr" value="<fmt:formatDate value="${defaultTime}" pattern="yyyy-MM-dd HH:mm"/>"
	  	   	  onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false,maxDate:'${maxDay }',minDate:'%y-%M-%d'})" id="coutm-time" readonly="readonly"/>
		  	  	 	  	  	   </div>
		  	  	 	  	  	   <div class="gov-d-il">
		  	  	 	  	  	   	  <span>包车范围：</span>
		  	  	 	  	  	   	  <label class="gov-d-ks">
		  	  	 	  	  	   	  	 <input type="radio" name="tabType" checked="checked" class="govday-checked" value="跨市"/>
		  	  	 	  	  	   	  	 <font>跨市包车</font>
		  	  	 	  	  	   	  </label>
		  	  	 	  	  	   	  <label class="gov-d-sn">
		  	  	 	  	  	   	  	 <input type="radio" name="tabType" class="govday-checked" value="市内"/>
		  	  	 	  	  	   	  	 <font>市内包车</font>
		  	  	 	  	  	   	  </label>
		  	  	 	  	  	   </div>
                               <div class="gov-d-il">
		  	  	 	  	  	   	  <span>包车天数：</span>
		  	  	 	  	  	   	  <select class="gov-dil-op" id="day" name="daysnum">
		  	  	 	  	  	   	    	<option value="0" class="gov-halfday">0.5天</option>
		  	  	 	  	  	   	    	<option value="1" selected="selected" class="gov-oneday">1天</option>
		  	  	 	  	  	   	    	<option value="2">2天</option>
		  	  	 	  	  	   	    	<option value="3">3天</option>
		  	  	 	  	  	   	    	<option value="4">4天</option>
		  	  	 	  	  	   	    	<option value="5">5天</option>
		  	  	 	  	  	   	    	<option value="6">6天</option>
		  	  	 	  	  	   	    	<option value="7">7天</option>
		  	  	 	  	  	   	    	<option value="8">8天</option>
		  	  	 	  	  	   	    	<option value="9">9天</option>
		  	  	 	  	  	   	    	<option value="10">10天</option>
		  	  	 	  	  	   	  </select>
		  	  	 	  	  	   </div>
		  	  	 	  	  	   <div class="gov-dil-c">
		  	  	 	  	  	   	   <input type="submit" name="" id="" value="查询" />
		  	  	 	  	  	   </div>
		  	  	 	  	  </form>
		  	  	 	  </div>
		  	  	 </div>
		  	  </div>
		  </div>
		 <%@include file="../index/foot.jsp" %>
	</body>
 </html>